3.4 \(\int \frac{\tan (x)}{a+a \cos (x)} \, dx\)

Optimal. Leaf size=18 \[ \frac{\log (\cos (x)+1)}{a}-\frac{\log (\cos (x))}{a} \]

[Out]

-(Log[Cos[x]]/a) + Log[1 + Cos[x]]/a

________________________________________________________________________________________

Rubi [A]  time = 0.0355734, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {2707, 36, 29, 31} \[ \frac{\log (\cos (x)+1)}{a}-\frac{\log (\cos (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]/(a + a*Cos[x]),x]

[Out]

-(Log[Cos[x]]/a) + Log[1 + Cos[x]]/a

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{\tan (x)}{a+a \cos (x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{x (a+x)} \, dx,x,a \cos (x)\right )\\ &=-\frac{\operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,a \cos (x)\right )}{a}+\frac{\operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,a \cos (x)\right )}{a}\\ &=-\frac{\log (\cos (x))}{a}+\frac{\log (1+\cos (x))}{a}\\ \end{align*}

Mathematica [A]  time = 0.0181677, size = 12, normalized size = 0.67 \[ \frac{2 \tanh ^{-1}(2 \cos (x)+1)}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]/(a + a*Cos[x]),x]

[Out]

(2*ArcTanh[1 + 2*Cos[x]])/a

________________________________________________________________________________________

Maple [A]  time = 0.059, size = 19, normalized size = 1.1 \begin{align*} -{\frac{\ln \left ( \cos \left ( x \right ) \right ) }{a}}+{\frac{\ln \left ( \cos \left ( x \right ) +1 \right ) }{a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)/(a+a*cos(x)),x)

[Out]

-ln(cos(x))/a+ln(cos(x)+1)/a

________________________________________________________________________________________

Maxima [A]  time = 1.17305, size = 24, normalized size = 1.33 \begin{align*} \frac{\log \left (\cos \left (x\right ) + 1\right )}{a} - \frac{\log \left (\cos \left (x\right )\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(a+a*cos(x)),x, algorithm="maxima")

[Out]

log(cos(x) + 1)/a - log(cos(x))/a

________________________________________________________________________________________

Fricas [A]  time = 1.41273, size = 58, normalized size = 3.22 \begin{align*} -\frac{\log \left (-\cos \left (x\right )\right ) - \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(a+a*cos(x)),x, algorithm="fricas")

[Out]

-(log(-cos(x)) - log(1/2*cos(x) + 1/2))/a

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\tan{\left (x \right )}}{\cos{\left (x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(a+a*cos(x)),x)

[Out]

Integral(tan(x)/(cos(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]  time = 1.28405, size = 26, normalized size = 1.44 \begin{align*} \frac{\log \left (\cos \left (x\right ) + 1\right )}{a} - \frac{\log \left ({\left | \cos \left (x\right ) \right |}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(a+a*cos(x)),x, algorithm="giac")

[Out]

log(cos(x) + 1)/a - log(abs(cos(x)))/a